package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IDeptDao;
import com.jemmyee.pizza.entity.Dept;

@Service("deptService")
public class DeptServiceImpl implements IDeptService<Dept> {
	
	private static final Log log = LogFactory.getLog(DeptServiceImpl.class);

	@Autowired
	private IDeptDao deptDao;


	public void delete(Dept entity) {
		deptDao.delete(entity);
	}

	public void deleteById(Serializable id) {
		deptDao.deleteById(id);
	}

	public Dept findById(Serializable id) {
		return deptDao.findById(id);
	}

	public void save(Dept entity) {
		deptDao.save(entity);
	}

	public void update(Dept entity) {
		deptDao.update(entity);
	}

	public List<Dept> findAll(Dept entity) {
		return deptDao.findAll(entity);
	}

	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		return deptDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	public List<Dept> findByProperty(String propertyName,
			Object value) {
		return deptDao.findByProperty(new Dept(), propertyName, value);
	}

	public List<Dept> findAll() {
		return deptDao.findAll(new Dept());
	}

	public List<Dept> findByCriteria(DetachedCriteria criteria) {
		return deptDao.findByCriteria(criteria);
	}

	public void deleteAll(List<Dept> list) {
		// TODO Auto-generated method stub
		
	}
}
